#include<vector>
#include<math.h>
using namespace std;
class Solution {
public:
    vector<double> dicesProbability(int n) {
        vector<vector<double>> dp(n, vector<double>(6*n));
        vector<double> ans(5*n+1, 0);
        //第一行
        for(int i=0; i<6; i++){
            dp[0][i] = 1;
        }

        for(int i = 1; i<n; i++){
            for(int j =i; j<6*(i+1); j++){
                for(int k=1; k<=6; k++){
                    if(i-1>=0 && j-k>=0){
                        dp[i][j]+=dp[i-1][j-k];
                    }
                }
            }
        }
        double all = pow(6.0, n);
        
        for (int i = 0; i < 5*n+1; i++)
        {
            ans[i] = dp[n-1][i+n-1]/all;
        }
        
        return ans;

    }
};